package com.sjlh.centurylianhua.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sjlh.centurylianhua.entity.LossesLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LosseslogMapper extends BaseMapper<LossesLog> {
    @Select("select lo.*, product.name productname,user.userName username,depot.name depotname from losses_log lo,product,user,depot"+" ${ew.customSqlSegment} ")
    List<LossesLog> getInfo(@Param("ew") QueryWrapper<LossesLog> wrapper);
    @Select("select lo.*, product.name productname,user.userName username,depot.name depotname from losses_log lo,product,user,depot"+" ${ew.customSqlSegment} ")
    List<LossesLog> getInfo(Page<LossesLog> page, @Param("ew") QueryWrapper<LossesLog> wrapper);
}
